package org.glz.controller;

import org.glz.pojo.Role;
import org.glz.service.RoleService;
import org.glz.vo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/sys/role")
public class RoleController {

    @Resource
    private RoleService roleService;

    @GetMapping("/searchAll")
    public Result searchAll(){
        List<Role> list = roleService.list();
        return Result.success(list);
    }


}
